while True:
    try:
        num1 = float(input("please input FIRST num: "))
        choice = str(input('please choose operational character"+ - * /"'))
        num2 = float(input('please input SENCOND num: '))
        ContinueStep = ["y", "yes"]
        
        if choice == "+":
            res = num1 + num2
        elif choice == "-":
            res = num1 - num2
        elif choice =="*":
            res = num1 * num2
        elif choice == "/":
            res = num1 / num2
        else:
            print('运算符错误，请重新输入！')
            continue
        print(f"{num1} {choice} {num2} = {res}")

        nextstep = input("Do you want to try again? ")
        if nextstep.lower() in ContinueStep:
            continue
        else:
            print("Good bye")
            break
    except ValueError as err:
        print(f'类型错误: {err}')
        continue
    except ZeroDivisionError as err:
        print(f'除数不能为0: {err}')
        continue